TESTHOST = iphone.local
HEAVENLY = /usr/local/share/iphone-filesystem

CC = arm-apple-darwin-gcc
CFLAGS = -fsigned-char -x objective-c -mmacosx-version-min=10.4
LD = arm-apple-darwin-ld
LDFLAGS = -ObjC -syslibroot $(HEAVENLY) \
	  -F$(HEAVENLY)/System/Library/Frameworks \
	  -framework CoreFoundation -framework Foundation \
	  -framework IOKit \
	  -framework UIKit -framework LayerKit -framework CoreGraphics \
	  -framework WebCore -framework GraphicsServices \
	  -framework CoreSurface -framework AppSupport \
	  -L/usr/local/arm-apple-darwin/lib/ -lSystem -lobjc \
	  -lcrt1.o

install:	anySIM
		install_name_tool -change libarmfp.dylib @executable_path/libarmfp.dylib anySIM
		cp anySIM anySIM.app/

all:	anySIM

anySIM:Unlock.o main.o
	$(LD) $(LDFLAGS) -o $@ $^

%.o:	%.m
		$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

clean:
		rm -f *.o anySIM

